package com.aaa.project.util;

import com.aaa.entity.BBusinessInfo;
import com.aaa.project.service.IBBusinessInfoService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestParam;

import javax.annotation.Resource;

@Component
public class GetBid {
    @Resource
    private IBBusinessInfoService ibBusinessInfoService;

    public String getbid(@RequestParam String telephone){
        QueryWrapper queryWrapper = new QueryWrapper();
        queryWrapper.eq("telephone", telephone);
        BBusinessInfo bBusinessInfo = ibBusinessInfoService.getOne(queryWrapper);
        return bBusinessInfo.getId();
    }
}
